<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Admin's list of cards</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="icon" type="image/ico" href="${pageContext.request.contextPath}/img/network.gif" />
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.8.3.js"></script>
<link rel="stylesheet" href="${pageContext.request.contextPath}/styles/styles.css"	type="text/css">
</head>
<body>
	<div id="wrapper">
		<div id="header">
			<%@ include file="/WEB-INF/jspf/header.jspf"%>
		</div><!-- #header-->
		<div id="content">
			<div align="center" style="margin: 30px 0 0 0;">
				<c:choose>
					<c:when test="${fn:length(cardbeanlist) == 0}">
						<h2><ct:i18n propertyKey="page.admin.list.cards.No_such_cards"/></h2>
					</c:when>
					<c:otherwise>
						<form action="controller" method="post">
							<input type="hidden" name="command" value="unlockCard">
							<table id="list_cards" rules="all">
								<thead>
									<tr>
										<td>ID</td>
										<td><ct:i18n propertyKey="page.admin.list.cards.Code"/></td>
										<td><ct:i18n propertyKey="page.admin.list.cards.Owner_name"/></td>
										<td><ct:i18n propertyKey="page.admin.list.cards.Owner_surname"/></td>
										<td><ct:i18n propertyKey="page.admin.list.cards.Name"/></td>
										<td><ct:i18n propertyKey="page.admin.list.cards.Balance"/></td>
										<td><ct:i18n propertyKey="page.admin.list.cards.Currency"/></td>
										<td><ct:i18n propertyKey="page.admin.list.cards.Status"/></td>
										<td><ct:i18n propertyKey="page.admin.list.cards.Unlock"/></td>
									</tr>
								</thead>
								<c:forEach var="bean" items="${cardbeanlist}">
									<tr>
										<td><c:out value="${bean.id}" /></td>
										<td><c:out value="${bean.code}" /></td>
										<td><c:out value="${bean.ownerName}" /></td>
										<td><c:out value="${bean.ownerSurname}" /></td>
										<td><c:out value="${bean.name}" /></td>
										<td><c:out value="${bean.balance}" /></td>
										<td><c:out value="${bean.currency}" /></td>
										<td><ct:i18n propertyKey="page.admin.list.cards.${bean.status}"/></td>
										<td><input type="checkbox" name="id" value="${bean.id}" /></td>
									</tr>
								</c:forEach>
							</table>
							<input class="submit" type="submit" value="<ct:i18n propertyKey="page.admin.list.cards.Unlock"/>" >
						</form>
					</c:otherwise>
				</c:choose>
			</div>
		</div><!-- #content-->
	</div><!-- #wrapper -->
	<div id="footer">
		<%@ include file="/WEB-INF/jspf/footer.jspf"%>
	</div><!-- #footer -->
</body>
</html>